import Vue from 'vue'
import Vuex from 'vuex'
import api from '@/api/api.js'
Vue.use(Vuex)
export default  new Vuex.Store({
    state: {
      count: 0,
      allInfo:{
        phone:'',
        idcard:'',
        openid:'',
        realName:'',
        cardAddress:'',
        idcardImgs:'',
        salecardImgs:'',
        shopkeeper:'',
        shopAddress:'',
        shopImgs:'',
        licenseImgs:'',
        companyName:'',
        companyAdress:'',
        companyPerson:'',
        companyRegnum:'',
      }
      
    },
    mutations: {
      increment (state) {
        state.count++
      },
      setAll(state,obj){
        state.allInfo = obj;
      }
      
    
      
    },
    actions:{
      // getMessageNum(context){
      //   api.messageMng.getUnReadCount({},res=>{
      //     context.commit('setMessageNum',res.result);
      //   })
      // }
    }
  }) 